package com.btpn.custody.service;

import java.util.Date;
import java.util.List;

import com.btpn.custody.entity.MasterData;
import com.btpn.custody.web.m003.model.Report01Model;
import com.btpn.custody.web.m003.model.Report04Model;
import com.btpn.custody.web.m003.model.Report05Model;

public interface IMasterService {
	/* =================================================== B A S I C ==================================================== */
//	CompleteData get(Long id);
//	
//	List<CompleteData> getAll();
//	
//	void create(CompleteData completeData);
//	
//	void update(MasterData masterData);
//	
//	void createOrUpdate(CompleteData completeData);
//	
//	void delete(Long id);
//	
//	Integer getCount();
	
	/* =================================================== C U S T O M ================================================== */
	String relateWithBranch(String user);
	String relateWithBranch(String user, Date from, Date to);
	
	String sendEmailToBranch(String mdSid, String emailMsg, String user);
	
	int updateStatuses(String[] sids, String status);
	void updateStatus(String sid, String status);
	void updateStatus(String sid, String status, String username);
	
	// use at CompletingDocsAction.setCompleted()
	void decideCompleted(String[] sids, String status, String emailMsg, String user);
	
	// use at ApprovalAction.setApproved()
	void decideApproved(String[] sids, String status);
	// use at ApprovalAction.setOneApproved()
	void decideApproved(String sids, String status);
	
	// use at ValidationProduct
	String decideValidated(MasterData md, String msg);
	
	// use at ValidationProduct
	void calculateGrade(MasterData md);
	
	List<Report01Model> findReport01(Long branchId, Date from, Date to);
	// report03 masih di action
	List<Report04Model> findReport04(Long branchId, Date from, Date to);
	List<Report05Model> findReport05(Long branchId, Date from, Date to);
}
